package com.test1223;

public class Test19 {
    public static void main(String[] args) {
        // 打印：等腰三角形
        //    *
        //   ***
        //  *****
        int n = 3;
        for (int h = 1; h <= n; h++) {
            for (int i = 1; i <= n - h; i++) {
                System.out.print(" ");

            }
            for (int i = 1; i <= 2 * h - 1; i++) {//每层打印的星号数量2*h-1
                System.out.print("*");
            }
            System.out.println();
        }

    }
    }


